package com.bill99.rpc.registry.zookeeper.client;

import java.util.List;

import com.bill99.rpc.registry.url.RegistryUrl;
import com.bill99.rpc.registry.zookeeper.ChildListener;
import com.bill99.rpc.registry.zookeeper.StateListener;

/**
 * @author sheng.zhang
 *
 */
public interface ZookeeperClient {

	public void create(String path, boolean ephemeral);

	public void delete(String path);

	public List<String> getChildren(String path);

	public List<String> addChildListener(String path, ChildListener listener);

	public void removeChildListener(String path, ChildListener listener);

	public void addStateListener(StateListener listener);

	public void removeStateListener(StateListener listener);

	public boolean isConnected();

	public void close();

	public RegistryUrl getRegistryUrl();

}
